package com.gxwy.yonghuziliao.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gxwy.yonghuziliao.dao.YongHuZiLiaoDao;
import com.gxwy.yonghuziliao.form.YongHuZiLiao;

@Service
public class YongHuZiLiaoServiceImpl implements YongHuZiLiaoService {

	@Autowired
	private YongHuZiLiaoDao dao;
	
	@Transactional
	public List<YongHuZiLiao> findAll(String username) {
		return dao.findAll(username);
	}

	@Transactional
	public void addYongHuZiLiao(YongHuZiLiao yhzl) {
		dao.addYongHuZiLiao(yhzl);
		
	}

	@Transactional
	public void deleteYongHuZiLiao(int id) {
		dao.deleteYongHuZiLiao(id);
		
	}

	@Transactional
	public void updateBieMing(String bieming,int id) {
		dao.updateBieMing(bieming,id);
		
	}

	@Transactional
	public YongHuZiLiao findById(int id) {
		return dao.findById(id);
	}

	@Transactional
	public void guashi(int id) {
		dao.guashi(id);
		
	}

	@Transactional
	public void updateYinHangMiMa(YongHuZiLiao yhzl) {
		dao.updateYinHangMiMa(yhzl);
		
	}

	@Transactional
	public YongHuZiLiao findByZhangHao(String yhzh) {
		
		return dao.findByZhangHao(yhzh);
	}
	@Transactional
	public void Delete(Integer id) {
	   dao.Delete(id);
	}
	@Transactional
	public void Update(YongHuZiLiao contact, Integer id) {
		dao.Update(contact, id);
	}

	}


